package com.lvmama.rhino.common.utils.kafka


/**
  * Created by yuanxiaofeng on 2016/6/24.
  */
class KafkaPayloadStringCodec extends Serializable{
  def decodeValue(payload: KafkaPayload): Option[String] = {
    val record = payload.value
    Some(record)
  }

  def encodeValue(value: String): KafkaPayload = {
    KafkaPayload(None, value)
  }
}

object KafkaPayloadStringCodec {
  def apply(): KafkaPayloadStringCodec = new KafkaPayloadStringCodec
}